package com.zj.web.bean;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderdetailDTO {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long detailId;//订单商品id
    private Long orderId;//订单id
    private Long productId;//商品id
    private Integer count;//数量
    private Double currentPrice;//当前单价

    public OrderdetailDTO(Long productId, Integer quantity, Double totalPrice) {
        this.productId = productId;
        this.count = quantity;
        this.currentPrice = totalPrice;
    }
}
